﻿@using Utilities
@using Models;
@model StockChangeRecord
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        initialStock();
    });
</script>
@Html.ValidationSummary(true)
<fieldset>
    <legend>库存变化记录</legend>
    <div class="editor-label">
        @Html.LabelFor(model => model.StockChangeName)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.StockChangeName)
        @Html.ValidationMessageFor(model => model.StockChangeName)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.StockChangeTypeID, "库存变化类型")
    </div>
    <div class="editor-field">
    @Html.DropDownListFor(model => model.StockChangeTypeID, new SelectList(CH.GetAllData<StockChangeType>(), "ID", "StockChangeTypeName"), "-请选择-") 
    @Html.ValidationMessageFor(model => model.StockChangeTypeID) 
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.CategoryID, "库存变化的库存品种类")
    </div>
    <div class="editor-field">
    @Html.DropDownListFor(model => model.CategoryID, new SelectList(CH.GetAllData<Category>(), "ID", "CategoryName"), "-请选择-") 
    @Html.ValidationMessageFor(model => model.CategoryID) 
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.QualityID, "库存变化的库存品质量")
    </div>
    <div class="editor-field">
    @Html.DropDownListFor(model => model.QualityID, new SelectList(CH.GetAllData<Quality>(), "ID", "QualityName"), "-请选择-") 
    @Html.ValidationMessageFor(model => model.QualityID) 
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.AreaID, "所在单位")
    </div>
    <div class="editor-field">
    @Html.DropDownListFor(model => model.AreaID, new SelectList(CH.GetAllData<Area>(), "ID", "AreaName"), "-请选择-") 
    @Html.ValidationMessageFor(model => model.AreaID) 
    </div>
     <div class="editor-label">
        @Html.LabelFor(model => model.WarehouseID, "所在仓库")
    </div>
    <div class="editor-field">
    @Html.DropDownListFor(model => model.WarehouseID, new SelectList(new List<Warehouse>(), "ID", "WarehouseName"), "-请选择-") 
    @Html.ValidationMessageFor(model => model.WarehouseID) 
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Volume)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Volume)
        @Html.ValidationMessageFor(model => model.Volume)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Description)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Description)
        @Html.ValidationMessageFor(model => model.Description)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Sequence)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Sequence)
        @Html.ValidationMessageFor(model => model.Sequence)
    </div>
    <p>
        <input type="submit" value="保存" />
    </p>
</fieldset>